﻿@using DevExtreme.NETCore.Demos.Models.TreeList
@model IEnumerable<Employee>

@{
    var filterValue = new object[] { "City", FilterBuilderFieldFilterOperations.Equal, "Bentonville" };
}

@(Html.DevExtreme().TreeList<Employee>()
    .ID("employees")
    .DataSource(Model)
    .KeyExpr("ID")
    .ParentIdExpr("HeadID")
    .ShowBorders(true)
    .ExpandedRowKeys(new[] { 1 })
    .FilterPanel(f => f.Visible(true))
    .HeaderFilter(h => h.Visible(true))
    .FilterRow(f => f.Visible(true))
    .FilterValue(filterValue)
    .Columns(column => {
        column.AddFor(m => m.FullName);
        column.AddFor(m => m.Title);
        column.AddFor(m => m.City);
        column.AddFor(m => m.State);
        column.AddFor(m => m.MobilePhone);
        column.AddFor(m => m.HireDate);
    })
)
